<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<link href="/static/css/admin/style_new2019.css" rel="stylesheet"/>
	<link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
	<title><?php echo L('website_manage');?></title>
	<script>
	var URL = '/index.php/Admin/Config';
	var SELF = '/index.php/Admin/Config/index/menuid/381.html';
	var PAGE = '/index.php/Admin/Config/index/menuid/381.html';
	var ROOT_PATH = '';
	var APP	 =	 '/index.php';
	//语言项目
	var lang = new Object();
	lang.connecting_please_wait = "请稍后...";
	lang.confirm_title = "提示消息";
	lang.move = "移动";
	lang.title_empty = "请输入宝贝名称";
	lang.iid_empty = "IID不能为空";
	lang.dialog_title = "消息";
	lang.dialog_ok = "确定";
	lang.dialog_cancel = "取消";
	lang.please_input = "请输入";
	lang.please_select = "请选择";
	lang.not_select = "不选择";
	lang.all = "所有";
	lang.input_right = "输入正确";
	lang.plsease_select_rows = "请选择要操作的项目！";
	lang.upload = "上传";lang.uploading = "上传中";
	lang.upload_type_error = "不允许上传的文件类型！";
	lang.upload_size_error = "文件大小不能超过{sizeLimit}！";
	lang.upload_minsize_error = "文件大小不能小于{minSizeLimit}！";
	lang.upload_empty_error = "文件为空，请重新选择！";
	lang.upload_nofile_error = "没有选择要上传的文件！";
	lang.upload_onLeave = "正在上传文件，离开此页将取消上传！";
	lang.menu_name="菜单名称";
	lang.module_name="模块名";
	lang.action_name="方法名";
	</script>
</head>

<body>

<div id="J_ajax_loading" class="ajax_loading"><?php echo L('ajax_loading');?></div>
<div style="height: 20px;width: 100%"></div>
<?php if(($sub_menu != '') OR ($big_menu != '')): ?><div class="subnav">
    <div class="content_menu ib_a blue line_x">
    	<?php if(!empty($big_menu)): ?><a class="add fb J_showdialog" href="javascript:void(0);" data-uri="<?php echo ($big_menu["iframe"]); ?>" data-title="<?php echo ($big_menu["title"]); ?>" data-id="<?php echo ($big_menu["id"]); ?>" data-width="<?php echo ($big_menu["width"]); ?>" data-height="<?php echo ($big_menu["height"]); ?>"><em><?php echo ($big_menu["title"]); ?></em></a>　<?php endif; ?>
        <?php if(!empty($sub_menu)): if(is_array($sub_menu)): $key = 0; $__LIST__ = $sub_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($key % 2 );++$key; if($key != 1): ?><span>|</span><?php endif; ?>
        <a href="<?php echo U($val['module_name'].'/'.$val['action_name'],array('menuid'=>$menuid)); echo ($val["data"]); ?>" class="<?php echo ($val["class"]); ?>"><em><?php echo ($val['name']); ?></em></a><?php endforeach; endif; else: echo "" ;endif; endif; ?>
    </div>
</div><?php endif; ?>
<!--栏目列表-->
<div class="pad_lr_10">
    <div class="J_tablelist table_list" data-acturi="<?php echo U('Config/ajax_edit');?>">
    <table width="100%" cellspacing="0" id="J_cate_tree">
        <thead>
            <tr>
                <th width="30"><input type="checkbox" name="checkall" class="J_checkall"></th>
              	<th align="left" width="230">特殊标记（变量获取）<br>配置名称</th>
                <th align="left">配置详解</th>
                <th width="70">类型</th>
                <th width="40"><span tdtype="order_by" fieldname="ordid">排序</span></th>
                <th width="120">操作</th>
            </tr>
        </thead>
    	<tbody>
        <?php if(is_array($list)): foreach($list as $key=>$item): ?><tr id="tr_id_<?php echo ($item["id"]); ?>">
                <td align='center'><input type='checkbox' value='<?php echo ($item["id"]); ?>' class='J_checkitem'></td>
                <td><div><?php echo ($item["name"]); ?></div><div style="color: #ff0000"><?php echo ($item["title"]); ?></div></td>
                <td align='left'><?php echo ($item["remark"]); ?></td>
                <td align='center'>
                    <?php if($item['type'] == 3): ?>两列变量
                        <?php elseif($item['type'] == 2): ?>一列变量
                        <?php else: ?>单个变量<?php endif; ?>
                </td>
                <td align='center'><span data-tdtype='edit' data-field='ordid' data-id='<?php echo ($item["id"]); ?>' class='tdedit'><?php echo ($item["ordid"]); ?></span></td>
                <td align='center'>
                    <a href="javascript:;" class="J_showdialog" data-uri="<?php echo U('config/add_value',array('id'=>$item['id']));?>" data-title="修改 - <?php echo ($item['title']); ?> - 的值" data-id="add_value" data-width="500" data-height="150">修改配置值</a> |
                    <a href="javascript:;" data-callback="dd('#tr_id_<?php echo ($item["id"]); ?>')" data-acttype="ajax" class="J_confirmurl" data-uri="<?php echo U('config/delete',array('id'=>$item['id']));?>" data-msg="确认要删除 - <?php echo ($item['title']); ?> - 吗？">删除</a>
                </td>
            </tr><?php endforeach; endif; ?>
    	</tbody>
    </table>
    </div>
    <div style="height: 60px;"></div>
    <div class="btn_wrap_fixed">
        <label class="select_all"><input type="checkbox" name="checkall" class="J_checkall">全选/取消</label>
        <input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="<?php echo U('config/delete');?>?ok=1" data-name="id" data-msg="确认删除" value="删除" />
    </div>
</div>
<script src="/static/js/jquery/jquery.js"></script>
<script src="/static/js/jquery/plugins/jquery.tools.min.js"></script>
<script src="/static/js/jquery/plugins/formvalidator.js"></script>
<script src="/static/js/yhxia.js"></script>
<script src="/static/js/admin.js"></script>
<script src="/static/js/dialog.js"></script>
<script>
//初始化弹窗   errNum   retData    errMsg
(function (d) {
    d['okValue'] = lang.dialog_ok;
    d['cancelValue'] = lang.dialog_cancel;
    d['title'] = lang.dialog_title;
})($.dialog.defaults);
</script>

<?php if(isset($list_table)): ?><script src="/static/js/jquery/plugins/listTable.js"></script>
<script>
$(function(){
	$('.J_tablelist').listTable();
});
</script><?php endif; ?>
<script src="/static/js/jquery/plugins/jquery.treetable.js"></script>
<script>
    function dd(obj){$(obj).remove();}
    $(function(){
        $("#J_cate_tree").treeTable({indent:20,treeColumn:1});
        $(".J_preview").preview();
    });
</script>
</body>
</html>